<?php if (!defined('THINK_PATH')) exit();?><!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<title>工作总结</title>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="/Public/Admin/lib/html5.js"></script>
<script type="text/javascript" src="/Public/Admin/lib/respond.min.js"></script>
<script type="text/javascript" src="/Public/Admin/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/Public/Admin/lib/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/Public/Admin/lib/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/Public/Admin/lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/Public/Admin/css/sty.css">
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->

<style type="text/css">
	.textarea{height: 150px}
	.wq5{margin-top: 10px;margin-bottom: 10px;}
	.textarea{height:200px;}
	.a_c{float: right;padding-right: 100px;padding-top: 20px;color: blue}
	/*.tj1{text-align: center;}*/
    .btn{font-size: 14px !important;height: 31px;}
    .form-horizontal .form-label{margin-top: 0px !important}
</style>
</head>


<body>

    <div class="page-container">
        <form class="form form-horizontal" >
        	<!--<div class="mt-20 wq5" style="margin:5px 0px;padding-bottom:0px !important;padding-top: 12px !important">-->
    	    	
            <!--</div>-->
            <div class="mt-15 wq5" style="margin:0px;">
                <div class="row cl">
    				<label class="form-label col-xs-2 col-sm-2" style="width: 20% !important;">总结日期：</label>
    				<div class="formControls col-xs-8 col-sm-8">
    					<?php echo (date('Y-m-d',$workArr["date"])); ?>
    				</div>
    			</div>
    	    	<div class="row cl">
    				<label class="form-label col-xs-2 col-sm-2" style="width: 20% !important;margin-top:-5px;">总结内容：</label>
                    <div class="formControls col-xs-8 col-sm-8 input_box">
                        <textarea name="content" rows="8" class="textarea" id="content" placeholder="请输入总结内容" datatype="*10-100" dragonfly="true" ><?php echo ($workArr["content"]); ?></textarea>
                    </div>
    			</div>
            </div>
    
            <div class="text-c mt-20">
            	<button onClick="tj();" id="sub" class="btn btn-primary radius" type="button">&nbsp;&nbsp;修改&nbsp;&nbsp;</button>&nbsp;&nbsp;&nbsp;&nbsp;
            	<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </form>
    </div>

	<!--_footer 作为公共模版分离出去-->
	<script type="text/javascript" src="/Public/Admin/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="/Public/Admin/lib/layer/2.1/layer.js"></script>
	<script type="text/javascript" src="/Public/Admin/lib/static/h-ui/js/H-ui.js"></script>
	<script type="text/javascript" src="/Public/Admin/lib/static/h-ui.admin/js/H-ui.admin.js"></script>
	<script type="text/javascript" src="/Public/Admin/lib/My97DatePicker/WdatePicker.js"></script>
	<!--/请在下方写此页面业务相关的脚本-->
	<script type="text/javascript">
		// 添加新行
        /*function add(){
            var len = $('.input_box').length + 1;
            var content = '<div class="formControls col-xs-8 col-sm-9 col-xs-offset-3 col-sm-offset-3 textarea1 input_box"><label>' + len + '. </label><textarea name="content' + len + '" rows="8" class="textarea" placeholder="请输入总结内容" dragonfly="true" datatype="*10-100"></textarea></div>';
            $('.input_box:last').after(content);
            $('#num').val(len);
        }*/

        // 保存
        function tj(){
            //$('form').submit();
            if( $.trim($('#content').val()) ){
                $('#sub').attr('onclick','');  // 避免重复提交
                $.ajax({
                    url: "<?php echo U('Work/editCheck',array('id'=>$workArr['id']));?>",
                    type: "POST",
                    data: $('form').serializeArray(),
                    success: function(msg){
                        //console.log(msg);
                        if(msg['state'] == 200){
                            layer.msg(msg['content'],{icon:1,time:1000});
                            setTimeout('parent.location.href = "<?php echo U('Work/index');?>"', 1000);
                        }else{
                            layer.msg(msg['content'],{icon:2,time:1000});
                            $('#sub').attr('onclick','tj()');  // 添加出错，允许重新提交
                        }
                    }
                });
            }else{
                layer.msg('请填写总结内容',{icon:2,time:1000});
            }

        }


	</script>


</body>
</html>